home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tk8.0 / unix / Makefile.in < prev    next >
Encoding:
Makefile  |  1997-08-15  |  32.8 KB  |  979 lines  |  [TEXT/ALFA]

  1. #
  2. # This file is a Makefile for Tk.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7. #
  8. # SCCS: @(#) Makefile.in 1.145 97/08/15 10:53:53
  9.  
  10. # Current Tk version;  used in various names.
  11.  
  12. TCLVERSION = @TCL_VERSION@
  13. VERSION = @TK_VERSION@
  14.  
  15. #----------------------------------------------------------------
  16. # Things you can change to personalize the Makefile for your own
  17. # site (you can make these changes in either Makefile.in or
  18. # Makefile, but changes to Makefile will get lost if you re-run
  19. # the configuration script).
  20. #----------------------------------------------------------------
  21.  
  22. # Default top-level directories in which to install architecture-
  23. # specific files (exec_prefix) and machine-independent files such
  24. # as scripts (prefix).  The values specified here may be overridden
  25. # at configure-time with the --exec-prefix and --prefix options
  26. # to the "configure" script.
  27.  
  28. prefix =        @prefix@
  29. exec_prefix =        @exec_prefix@
  30.  
  31. # The following definition can be set to non-null for special systems
  32. # like AFS with replication.  It allows the pathnames used for installation
  33. # to be different than those used for actually reference files at
  34. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  35. # when installing files.
  36. INSTALL_ROOT =
  37.  
  38. # Directory from which applications will reference the library of Tcl
  39. # scripts (note: you can set the TK_LIBRARY environment variable at
  40. # run-time to override the compiled-in location):
  41. TK_LIBRARY =        $(prefix)/lib/tk$(VERSION)
  42.  
  43. # Path name to use when installing library scripts:
  44. SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TK_LIBRARY)
  45.  
  46. # Directory in which to install the .a or .so binary for the Tk library:
  47. LIB_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/lib
  48.  
  49. # Path to use at runtime to refer to LIB_INSTALL_DIR:
  50. LIB_RUNTIME_DIR =    $(exec_prefix)/lib
  51.  
  52. # Directory in which to install the program wish:
  53. BIN_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/bin
  54.  
  55. # Directory from which the program wish should be referenced by scripts:
  56. BIN_DIR =        $(exec_prefix)/bin
  57.  
  58. # Directory in which to install the include file tk.h:
  59. INCLUDE_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/include
  60.  
  61. # Top-level directory for manual entries:
  62. MAN_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/man
  63.  
  64. # Directory in which to install manual entry for wish:
  65. MAN1_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man1
  66.  
  67. # Directory in which to install manual entries for Tk's C library
  68. # procedures:
  69. MAN3_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man3
  70.  
  71. # Directory in which to install manual entries for the built-in
  72. # Tcl commands implemented by Tk:
  73. MANN_INSTALL_DIR =    $(MAN_INSTALL_DIR)/mann
  74.  
  75. # The directory containing the Tcl sources and headers appropriate
  76. # for this version of Tk ("srcdir" will be replaced or has already
  77. # been replaced by the configure script):
  78. TCL_GENERIC_DIR =    @TCL_SRC_DIR@/generic
  79.  
  80. # The directory containing the Tcl library archive file appropriate
  81. # for this version of Tk:
  82. TCL_BIN_DIR =        @TCL_BIN_DIR@
  83.  
  84. # A "-I" switch that can be used when compiling to make all of the
  85. # X11 include files accessible (the configure script will try to
  86. # set this value, and will cause it to be an empty string if the
  87. # include files are accessible via /usr/include).
  88. X11_INCLUDES =        @XINCLUDES@
  89.  
  90. # Linker switch(es) to use to link with the X11 library archive (the
  91. # configure script will try to set this value automatically, but you
  92. # can override it).
  93. X11_LIB_SWITCHES =    @XLIBSW@
  94.  
  95. # Libraries to use when linking.  This definition is determined by the
  96. # configure script.
  97. LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
  98.  
  99. # To change the compiler switches, for example to change from -O
  100. # to -g, change the following line:
  101. CFLAGS = -O
  102.  
  103. # To turn off the security checks that disallow incoming sends when
  104. # the X server appears to be insecure, reverse the comments on the
  105. # following lines:
  106. SECURITY_FLAGS =
  107. #SECURITY_FLAGS = -DTK_NO_SECURITY
  108.  
  109. # To disable ANSI-C procedure prototypes reverse the comment characters
  110. # on the following lines:
  111. PROTO_FLAGS =
  112. #PROTO_FLAGS = -DNO_PROTOTYPE
  113.  
  114. # To enable memory debugging reverse the comment characters on the following
  115. # lines.  Warning:  if you enable memory debugging, you must do it
  116. # *everywhere*, including all the code that calls Tcl, and you must use
  117. # ckalloc and ckfree everywhere instead of malloc and free.
  118. MEM_DEBUG_FLAGS =
  119. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  120.  
  121. # If your X server is X11R4 or earlier, then you may wish to reverse
  122. # the comment characters on the following two lines.  This will enable
  123. # extra code to speed up XStringToKeysym.  In X11R5 and later releases
  124. # XStringToKeysym is plenty fast, so you needn't define REDO_KEYSYM_LOOKUP.
  125. KEYSYM_FLAGS =
  126. #KEYSYM_FLAGS = -DREDO_KEYSYM_LOOKUP
  127.  
  128. # Some versions of make, like SGI's, use the following variable to
  129. # determine which shell to use for executing commands:
  130. SHELL =        /bin/sh
  131.  
  132. # Tk used to let the configure script choose which program to use
  133. # for installing, but there are just too many different versions of
  134. # "install" around;  better to use the install-sh script that comes
  135. # with the distribution, which is slower but guaranteed to work.
  136.  
  137. INSTALL = @srcdir@/install-sh -c
  138. INSTALL_PROGRAM =    ${INSTALL}
  139. INSTALL_DATA =        ${INSTALL} -m 644
  140.  
  141.  
  142. # The symbols below provide support for dynamic loading and shared
  143. # libraries.  The values of the symbols are normally set by the
  144. # configure script.  You shouldn't normally need to modify any of
  145. # these definitions by hand.
  146.  
  147. TK_SHLIB_CFLAGS = @TK_SHLIB_CFLAGS@
  148.  
  149. TK_LIB_FILE = @TK_LIB_FILE@
  150. #TK_LIB_FILE = libtk.a
  151.  
  152. # The symbol below provides support for dynamic loading and shared
  153. # libraries.  See configure.in for a description of what it means.
  154. # The values of the symbolis normally set by the configure script.
  155.  
  156. SHLIB_LD = @SHLIB_LD@
  157.  
  158. # Additional search flags needed to find the various shared libraries
  159. # at run-time.  The first symbol is for use when creating a binary
  160. # with cc, and the second is for use when running ld directly.
  161. TK_CC_SEARCH_FLAGS = @TK_CC_SEARCH_FLAGS@
  162. TK_LD_SEARCH_FLAGS = @TK_LD_SEARCH_FLAGS@
  163.  
  164. #----------------------------------------------------------------
  165. # The information below is modified by the configure script when
  166. # Makefile is generated from Makefile.in.  You shouldn't normally
  167. # modify any of this stuff by hand.
  168. #----------------------------------------------------------------
  169.  
  170. AC_FLAGS =        @DEFS@
  171. RANLIB =        @RANLIB@
  172. SRC_DIR =        @srcdir@/..
  173. TOP_DIR =        @srcdir@/..
  174. GENERIC_DIR =        $(TOP_DIR)/generic
  175. UNIX_DIR =         @srcdir@
  176. BMAP_DIR =        $(TOP_DIR)/bitmaps
  177. TOOL_DIR =        @TCL_SRC_DIR@/tools
  178.  
  179. #----------------------------------------------------------------
  180. # The information below should be usable as is.  The configure
  181. # script won't modify it and you shouldn't need to modify it
  182. # either.
  183. #----------------------------------------------------------------
  184.  
  185.  
  186. CC =        @CC@
  187. CC_SWITCHES =    ${CFLAGS} ${TK_SHLIB_CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
  188. -I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} \
  189. ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS}
  190.  
  191. DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
  192. -I${BMAP_DIR} \
  193. -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
  194. ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
  195. ${KEYSYM_FLAGS}
  196.  
  197. WISH_OBJS = tkAppInit.o
  198.  
  199. TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o
  200.  
  201. WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
  202.     tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkScale.o \
  203.     tkScrollbar.o
  204.  
  205. CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \
  206.     tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \
  207.     tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o
  208.  
  209. IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o
  210.  
  211. TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
  212.     tkTextMark.o tkTextTag.o tkTextWind.o
  213.  
  214. UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \
  215.     tkUnixDialog.o tkUnixDraw.o \
  216.     tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \
  217.     tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \
  218.     tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o
  219.  
  220. OBJS =  tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \
  221.     tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
  222.     tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
  223.     tkMain.o tkOption.o tkPack.o tkPlace.o \
  224.     tkSelect.o tkUtil.o tkVisual.o tkWindow.o \
  225.     $(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS)
  226.  
  227. SRCS = \
  228.     $(GENERIC_DIR)/tk3d.c $(GENERIC_DIR)/tkArgv.c \
  229.     $(GENERIC_DIR)/tkAtom.c $(GENERIC_DIR)/tkBind.c    \
  230.     $(GENERIC_DIR)/tkBitmap.c $(GENERIC_DIR)/tkClipboard.c \
  231.     $(GENERIC_DIR)/tkCmds.c $(GENERIC_DIR)/tkColor.c \
  232.     $(GENERIC_DIR)/tkConfig.c $(GENERIC_DIR)/tkCursor.c \
  233.     $(GENERIC_DIR)/tkError.c $(GENERIC_DIR)/tkEvent.c \
  234.     $(GENERIC_DIR)/tkFocus.c $(GENERIC_DIR)/tkFont.c \
  235.     $(GENERIC_DIR)/tkGet.c $(GENERIC_DIR)/tkGC.c \
  236.     $(GENERIC_DIR)/tkGeometry.c $(GENERIC_DIR)/tkGrab.c \
  237.     $(GENERIC_DIR)/tkGrid.c \
  238.     $(GENERIC_DIR)/tkMain.c $(GENERIC_DIR)/tkOption.c \
  239.     $(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \
  240.     $(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkUtil.c \
  241.     $(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \
  242.     $(GENERIC_DIR)/tkButton.c \
  243.     $(GENERIC_DIR)/tkEntry.c $(GENERIC_DIR)/tkFrame.c \
  244.     $(GENERIC_DIR)/tkListbox.c $(GENERIC_DIR)/tkMenu.c \
  245.     $(GENERIC_DIR)/tkMenubutton.c $(GENERIC_DIR)/tkMenuDraw.c \
  246.     $(GENERIC_DIR)/tkMessage.c \
  247.     $(GENERIC_DIR)/tkScale.c $(GENERIC_DIR)/tkScrollbar.c \
  248.     $(GENERIC_DIR)/tkCanvas.c $(GENERIC_DIR)/tkCanvArc.c \
  249.     $(GENERIC_DIR)/tkCanvBmap.c $(GENERIC_DIR)/tkCanvImg.c \
  250.     $(GENERIC_DIR)/tkCanvLine.c $(GENERIC_DIR)/tkCanvPoly.c \
  251.     $(GENERIC_DIR)/tkCanvPs.c $(GENERIC_DIR)/tkCanvText.c \
  252.     $(GENERIC_DIR)/tkCanvUtil.c \
  253.     $(GENERIC_DIR)/tkCanvWind.c $(GENERIC_DIR)/tkRectOval.c \
  254.     $(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \
  255.     $(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \
  256.     $(GENERIC_DIR)/tkImgPPM.c \
  257.     $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkText.c \
  258.     $(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \
  259.     $(GENERIC_DIR)/tkTextImage.c \
  260.     $(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
  261.     $(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \
  262.     $(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
  263.     $(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \
  264.     $(UNIX_DIR)/tkUnix3d.c \
  265.     $(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \
  266.     $(UNIX_DIR)/tkUnixCursor.c \
  267.     $(UNIX_DIR)/tkUnixDialog.c $(UNIX_DIR)/tkUnixDraw.c \
  268.     $(UNIX_DIR)/tkUnixEmbed.c $(UNIX_DIR)/tkUnixEvent.c \
  269.     $(UNIX_DIR)/tkUnixFocus.c \
  270.     $(UNIX_DIR)/tkUnixFont.c $(UNIX_DIR)/tkUnixInit.c \
  271.     $(UNIX_DIR)/tkUnixMenu.c $(UNIX_DIR)/tkUnixMenubu.c \
  272.     $(UNIX_DIR)/tkUnixScale.c $(UNIX_DIR)/tkUnixScrlbr.c \
  273.     $(UNIX_DIR)/tkUnixSelect.c \
  274.     $(UNIX_DIR)/tkUnixSend.c $(UNIX_DIR)/tkUnixWm.c \
  275.     $(UNIX_DIR)/tkUnixXId.c
  276.  
  277.  
  278. HDRS = bltList.h \
  279.     default.h ks_names.h tkPatch.h tk.h tkButton.h tkCanvas.h tkInt.h  \
  280.     tkPort.h tkScrollbar.h tkText.h
  281.  
  282. DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
  283.  
  284. all: wish
  285.  
  286. # The following target is configured by autoconf to generate either
  287. # a shared library or non-shared library for Tk.
  288. @TK_LIB_FILE@: ${OBJS}
  289.     rm -f @TK_LIB_FILE@
  290.     @MAKE_LIB@
  291.     $(RANLIB) @TK_LIB_FILE@
  292.  
  293. # Make target which outputs the list of the .o contained in the Tk lib
  294. # usefull to build a single big shared library containing Tcl/Tk and other
  295. # extensions.  used for the Tcl Plugin.  -- dl
  296. tkLibObjs:
  297.     @echo ${OBJS}
  298. # This targets actually build the objects needed for the lib in the above
  299. # case
  300. objs: ${OBJS}
  301.  
  302.  
  303. wish: $(WISH_OBJS) $(TK_LIB_FILE)
  304.     $(CC) @LD_FLAGS@ $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
  305.         $(TK_CC_SEARCH_FLAGS) -o wish
  306.  
  307. tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
  308.     ${CC} @LD_FLAGS@ $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
  309.         $(TK_CC_SEARCH_FLAGS) -o tktest
  310.  
  311. xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
  312.     ${CC} @LD_FLAGS@ test.o tkTest.o tkSquare.o \
  313.         @TK_BUILD_LIB_SPEC@ $(LIBS) \
  314.         @TK_LD_SEARCH_FLAGS@ -lXt -o xttest
  315.  
  316. # Note, in the target below TCL_LIBRARY needs to be set or else
  317. # "make test" won't work in the case where the compilation directory
  318. # isn't the same as the source directory.
  319.  
  320. test: tktest
  321.     LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \
  322.     export LD_LIBRARY_PATH; \
  323.     TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
  324.     TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
  325.     ( echo cd $(TOP_DIR)/tests\; source all\; exit ) \
  326.     | ./tktest -geometry +0+0
  327.  
  328.  
  329. # Useful target to launch a built tktest with the proper path,...
  330. runtest:
  331.     LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \
  332.     export LD_LIBRARY_PATH; \
  333.     TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
  334.     TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
  335.     ./tktest
  336.  
  337. install: install-binaries install-libraries install-demos install-man
  338.  
  339. # Note: before running ranlib below, must cd to target directory because
  340. # some ranlibs write to current directory, and this might not always be
  341. # possible (e.g. if installing as root).
  342.  
  343. install-binaries: $(TK_LIB_FILE) wish
  344.     @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  345.         do \
  346.         if [ ! -d $$i ] ; then \
  347.         echo "Making directory $$i"; \
  348.         mkdir $$i; \
  349.         chmod 755 $$i; \
  350.         else true; \
  351.         fi; \
  352.         done;
  353.     @echo "Installing $(TK_LIB_FILE)"
  354.     @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
  355.     @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
  356.     @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
  357.     @echo "Installing wish"
  358.     @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
  359.     @echo "Installing tkConfig.sh"
  360.     @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
  361.  
  362. install-libraries:
  363.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
  364.         $(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images; \
  365.         do \
  366.         if [ ! -d $$i ] ; then \
  367.         echo "Making directory $$i"; \
  368.         mkdir $$i; \
  369.         chmod 755 $$i; \
  370.         else true; \
  371.         fi; \
  372.         done;
  373.     @echo "Installing tk.h"
  374.     @$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
  375.     for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \
  376.         do \
  377.         echo "Installing $$i"; \
  378.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  379.         done;
  380.     for i in $(SRC_DIR)/library/images/*; \
  381.         do \
  382.         if [ -f $$i ] ; then \
  383.         echo "Installing $$i"; \
  384.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/images; \
  385.         fi; \
  386.         done;
  387.  
  388. install-demos:
  389.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
  390.         $(SCRIPT_INSTALL_DIR)/demos \
  391.         $(SCRIPT_INSTALL_DIR)/demos/images ; \
  392.         do \
  393.         if [ ! -d $$i ] ; then \
  394.         echo "Making directory $$i"; \
  395.         mkdir $$i; \
  396.         chmod 755 $$i; \
  397.         else true; \
  398.         fi; \
  399.         done;
  400.     @for i in $(SRC_DIR)/library/demos/*; \
  401.         do \
  402.         if [ -f $$i ] ; then \
  403.         echo "Installing $$i"; \
  404.         sed -e '3 s|exec wish|exec wish$(VERSION)|' \
  405.             $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
  406.         fi; \
  407.         done;
  408.     @for i in $(DEMOPROGS); \
  409.         do \
  410.         chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
  411.         done;
  412.     @for i in $(SRC_DIR)/library/demos/images/*; \
  413.         do \
  414.         if [ -f $$i ] ; then \
  415.         echo "Installing $$i"; \
  416.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
  417.         fi; \
  418.         done;
  419.  
  420. install-man:
  421.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  422.         do \
  423.         if [ ! -d $$i ] ; then \
  424.         echo "Making directory $$i"; \
  425.         mkdir $$i; \
  426.         chmod 755 $$i; \
  427.         else true; \
  428.         fi; \
  429.         done;
  430.     @cd $(SRC_DIR)/doc; for i in *.1; \
  431.         do \
  432.         echo "Installing doc/$$i"; \
  433.         rm -f $(MAN1_INSTALL_DIR)/$$i; \
  434.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  435.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  436.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  437.         done;
  438.     $(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR)
  439.     @cd $(SRC_DIR)/doc; for i in *.3; \
  440.         do \
  441.         echo "Installing doc/$$i"; \
  442.         rm -f $(MAN3_INSTALL_DIR)/$$i; \
  443.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  444.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  445.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  446.         done;
  447.     $(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR)
  448.     @cd $(SRC_DIR)/doc; for i in *.n; \
  449.         do \
  450.         echo "Installing doc/$$i"; \
  451.         rm -f $(MANN_INSTALL_DIR)/$$i; \
  452.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  453.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  454.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  455.         done;
  456.     $(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR)
  457.  
  458. Makefile: $(UNIX_DIR)/Makefile.in
  459.     $(SHELL) config.status
  460.  
  461. clean:
  462.     rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out errors \
  463.         tktest wish config.info lib.exp
  464.  
  465. distclean: clean
  466.     rm -f Makefile config.status config.cache config.log tkConfig.sh \
  467.         SUNWtk.* prototype
  468.  
  469. depend:
  470.     makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
  471.  
  472. # Test binaries.  The rule for tkTestInit.o is complicated because
  473. # it is is compiled from tkAppInit.c.  Can't use the "-o" option
  474. # because this doesn't work on some strange compilers (e.g. UnixWare).
  475.  
  476. tkTestInit.o: $(UNIX_DIR)/tkAppInit.c
  477.     @if test -f tkAppInit.o ; then \
  478.         rm -f tkAppInit.sav; \
  479.         mv tkAppInit.o tkAppInit.sav; \
  480.     fi;
  481.     $(CC) -c $(CC_SWITCHES) -DTK_TEST $(UNIX_DIR)/tkAppInit.c
  482.     rm -f tkTestInit.o
  483.     mv tkAppInit.o tkTestInit.o
  484.     @if test -f tkAppInit.sav ; then \
  485.         mv tkAppInit.sav tkAppInit.o; \
  486.     fi;
  487.  
  488. tk3d.o: $(GENERIC_DIR)/tk3d.c
  489.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c
  490.  
  491. tkAppInit.o: $(UNIX_DIR)/tkAppInit.c
  492.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkAppInit.c
  493.  
  494. tkArgv.o: $(GENERIC_DIR)/tkArgv.c
  495.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkArgv.c
  496.  
  497. tkAtom.o: $(GENERIC_DIR)/tkAtom.c
  498.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkAtom.c
  499.  
  500. tkBind.o: $(GENERIC_DIR)/tkBind.c
  501.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBind.c
  502.  
  503. tkBitmap.o: $(GENERIC_DIR)/tkBitmap.c
  504.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBitmap.c
  505.  
  506. tkClipboard.o: $(GENERIC_DIR)/tkClipboard.c
  507.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkClipboard.c
  508.  
  509. tkCmds.o: $(GENERIC_DIR)/tkCmds.c
  510.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCmds.c
  511.  
  512. tkColor.o: $(GENERIC_DIR)/tkColor.c
  513.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkColor.c
  514.  
  515. tkConfig.o: $(GENERIC_DIR)/tkConfig.c
  516.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkConfig.c
  517.  
  518. tkCursor.o: $(GENERIC_DIR)/tkCursor.c
  519.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCursor.c
  520.  
  521. tkError.o: $(GENERIC_DIR)/tkError.c
  522.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkError.c
  523.  
  524. tkEvent.o: $(GENERIC_DIR)/tkEvent.c
  525.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEvent.c
  526.  
  527. tkFocus.o: $(GENERIC_DIR)/tkFocus.c
  528.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFocus.c
  529.  
  530. tkFont.o: $(GENERIC_DIR)/tkFont.c
  531.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFont.c
  532.  
  533. tkGet.o: $(GENERIC_DIR)/tkGet.c
  534.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGet.c
  535.  
  536. tkGC.o: $(GENERIC_DIR)/tkGC.c
  537.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGC.c
  538.  
  539. tkGeometry.o: $(GENERIC_DIR)/tkGeometry.c
  540.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGeometry.c
  541.  
  542. tkGrab.o: $(GENERIC_DIR)/tkGrab.c
  543.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrab.c
  544.  
  545. tkGrid.o: $(GENERIC_DIR)/tkGrid.c
  546.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrid.c
  547.  
  548. tkMain.o: $(GENERIC_DIR)/tkMain.c
  549.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMain.c
  550.  
  551. tkOption.o: $(GENERIC_DIR)/tkOption.c
  552.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOption.c
  553.  
  554. tkPack.o: $(GENERIC_DIR)/tkPack.c
  555.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPack.c
  556.  
  557. tkPlace.o: $(GENERIC_DIR)/tkPlace.c
  558.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlace.c
  559.  
  560. tkSelect.o: $(GENERIC_DIR)/tkSelect.c
  561.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSelect.c
  562.  
  563. tkUtil.o: $(GENERIC_DIR)/tkUtil.c
  564.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUtil.c
  565.  
  566. tkVisual.o: $(GENERIC_DIR)/tkVisual.c
  567.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
  568.  
  569. tkWindow.o: $(GENERIC_DIR)/tkWindow.c
  570.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
  571.  
  572. tkButton.o: $(GENERIC_DIR)/tkButton.c
  573.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c
  574.  
  575. tkEntry.o: $(GENERIC_DIR)/tkEntry.c
  576.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEntry.c
  577.  
  578. tkFrame.o: $(GENERIC_DIR)/tkFrame.c
  579.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFrame.c
  580.  
  581. tkListbox.o: $(GENERIC_DIR)/tkListbox.c
  582.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkListbox.c
  583.  
  584. tkMenu.o: $(GENERIC_DIR)/tkMenu.c
  585.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenu.c
  586.  
  587. tkMenubutton.o: $(GENERIC_DIR)/tkMenubutton.c
  588.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenubutton.c
  589.  
  590. tkMenuDraw.o: $(GENERIC_DIR)/tkMenuDraw.c
  591.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenuDraw.c
  592.  
  593. tkMessage.o: $(GENERIC_DIR)/tkMessage.c
  594.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMessage.c
  595.  
  596. tkScale.o: $(GENERIC_DIR)/tkScale.c
  597.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScale.c
  598.  
  599. tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c
  600.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c
  601.  
  602. tkSquare.o: $(GENERIC_DIR)/tkSquare.c
  603.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSquare.c
  604.  
  605. tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c
  606.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c
  607.  
  608. tkCanvArc.o: $(GENERIC_DIR)/tkCanvArc.c
  609.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvArc.c
  610.  
  611. tkCanvBmap.o: $(GENERIC_DIR)/tkCanvBmap.c
  612.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvBmap.c
  613.  
  614. tkCanvImg.o: $(GENERIC_DIR)/tkCanvImg.c
  615.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvImg.c
  616.  
  617. tkCanvLine.o: $(GENERIC_DIR)/tkCanvLine.c
  618.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvLine.c
  619.  
  620. tkCanvPoly.o: $(GENERIC_DIR)/tkCanvPoly.c
  621.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPoly.c
  622.  
  623. tkCanvPs.o: $(GENERIC_DIR)/tkCanvPs.c
  624.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPs.c
  625.  
  626. tkCanvText.o: $(GENERIC_DIR)/tkCanvText.c
  627.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvText.c
  628.  
  629. tkCanvUtil.o: $(GENERIC_DIR)/tkCanvUtil.c
  630.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvUtil.c
  631.  
  632. tkCanvWind.o: $(GENERIC_DIR)/tkCanvWind.c
  633.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvWind.c
  634.  
  635. tkRectOval.o: $(GENERIC_DIR)/tkRectOval.c
  636.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkRectOval.c
  637.  
  638. tkTrig.o: $(GENERIC_DIR)/tkTrig.c
  639.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTrig.c
  640.  
  641. tkImage.o: $(GENERIC_DIR)/tkImage.c
  642.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImage.c
  643.  
  644. tkImgBmap.o: $(GENERIC_DIR)/tkImgBmap.c
  645.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgBmap.c
  646.  
  647. tkImgGIF.o: $(GENERIC_DIR)/tkImgGIF.c
  648.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgGIF.c
  649.  
  650. tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c
  651.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c
  652.  
  653. tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c
  654.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c
  655.  
  656. tkTest.o: $(GENERIC_DIR)/tkTest.c
  657.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTest.c
  658.  
  659. tkText.o: $(GENERIC_DIR)/tkText.c
  660.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c
  661.  
  662. tkTextBTree.o: $(GENERIC_DIR)/tkTextBTree.c
  663.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextBTree.c
  664.  
  665. tkTextDisp.o: $(GENERIC_DIR)/tkTextDisp.c
  666.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextDisp.c
  667.  
  668. tkTextImage.o: $(GENERIC_DIR)/tkTextImage.c
  669.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextImage.c
  670.  
  671. tkTextIndex.o: $(GENERIC_DIR)/tkTextIndex.c
  672.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextIndex.c
  673.  
  674. tkTextMark.o: $(GENERIC_DIR)/tkTextMark.c
  675.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextMark.c
  676.  
  677. tkTextTag.o: $(GENERIC_DIR)/tkTextTag.c
  678.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextTag.c
  679.  
  680. tkTextWind.o: $(GENERIC_DIR)/tkTextWind.c
  681.     $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextWind.c
  682.  
  683. tkUnix.o: $(UNIX_DIR)/tkUnix.c
  684.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c
  685.  
  686. tkUnix3d.o: $(UNIX_DIR)/tkUnix3d.c
  687.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix3d.c
  688.  
  689. tkUnixButton.o: $(UNIX_DIR)/tkUnixButton.c
  690.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixButton.c
  691.  
  692. tkUnixColor.o: $(UNIX_DIR)/tkUnixColor.c
  693.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixColor.c
  694.  
  695. tkUnixCursor.o: $(UNIX_DIR)/tkUnixCursor.c
  696.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixCursor.c
  697.  
  698. tkUnixDialog.o: $(UNIX_DIR)/tkUnixDialog.c
  699.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDialog.c
  700.  
  701. tkUnixDraw.o: $(UNIX_DIR)/tkUnixDraw.c
  702.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDraw.c
  703.  
  704. tkUnixEmbed.o: $(UNIX_DIR)/tkUnixEmbed.c
  705.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEmbed.c
  706.  
  707. tkUnixEvent.o: $(UNIX_DIR)/tkUnixEvent.c
  708.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEvent.c
  709.  
  710. tkUnixFocus.o: $(UNIX_DIR)/tkUnixFocus.c
  711.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFocus.c
  712.  
  713. tkUnixFont.o: $(UNIX_DIR)/tkUnixFont.c
  714.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFont.c
  715.  
  716. tkUnixInit.o: $(UNIX_DIR)/tkUnixInit.c $(GENERIC_DIR)/tkInitScript.h tkConfig.sh
  717.     $(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \
  718.         $(UNIX_DIR)/tkUnixInit.c
  719.  
  720. tkUnixMenu.o: $(UNIX_DIR)/tkUnixMenu.c
  721.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenu.c
  722.  
  723. tkUnixMenubu.o: $(UNIX_DIR)/tkUnixMenubu.c
  724.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenubu.c
  725.  
  726. tkUnixScale.o: $(UNIX_DIR)/tkUnixScale.c
  727.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScale.c
  728.  
  729. tkUnixScrlbr.o: $(UNIX_DIR)/tkUnixScrlbr.c
  730.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScrlbr.c
  731.  
  732. tkUnixSelect.o: $(UNIX_DIR)/tkUnixSelect.c
  733.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSelect.c
  734.  
  735. tkUnixSend.o: $(UNIX_DIR)/tkUnixSend.c
  736.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSend.c
  737.  
  738. tkUnixWm.o: $(UNIX_DIR)/tkUnixWm.c
  739.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixWm.c
  740.  
  741. tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c
  742.     $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c
  743.  
  744. .c.o:
  745.     $(CC) -c $(CC_SWITCHES) $<
  746.  
  747. #
  748. # Target to check for proper usage of UCHAR macro.
  749. #
  750.  
  751. checkuchar:
  752.     -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
  753.  
  754. #
  755. # Target to make sure that only symbols with "Tk" prefixes are
  756. # exported.
  757. #
  758.  
  759. checkexports: $(TK_LIB_FILE)
  760.     -nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
  761.  
  762. #
  763. # Target to create a proper Tk distribution from information in the
  764. # master source directory.  DISTDIR must be defined to indicate where
  765. # to put the distribution.  DISTDIR must be an absolute path name.
  766. #
  767.  
  768. DISTNAME =    tk@TK_VERSION@@TK_PATCH_LEVEL@
  769. ZIPNAME =    tk@TK_MAJOR_VERSION@@TK_MINOR_VERSION@@TK_PATCH_LEVEL@.zip
  770. DISTDIR =    /proj/tcl/dist/$(DISTNAME)
  771. TCLDIR =     @TCL_SRC_DIR@
  772. $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
  773.     autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
  774.  
  775. dist:   $(UNIX_DIR)/configure
  776.     rm -rf $(DISTDIR)
  777.     mkdir $(DISTDIR)
  778.     mkdir $(DISTDIR)/unix
  779.     cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
  780.     cp $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
  781.     chmod 664 $(DISTDIR)/unix/Makefile.in
  782.     cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \
  783.         $(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
  784.         $(UNIX_DIR)/porting.notes $(UNIX_DIR)/porting.old \
  785.         $(UNIX_DIR)/README $(DISTDIR)/unix
  786.     chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
  787.     chmod +x $(DISTDIR)/unix/install-sh
  788.     tclsh $(TCLDIR)/unix/mkLinks.tcl $(TOP_DIR)/doc/*.[13n] \
  789.         > $(DISTDIR)/unix/mkLinks
  790.     chmod +x $(DISTDIR)/unix/mkLinks
  791.     mkdir $(DISTDIR)/bitmaps
  792.     @(cd $(TOP_DIR); for i in bitmaps/* ; do \
  793.         if [ -f $$i ] ; then \
  794.         sed -e 's/static char/static unsigned char/' \
  795.                $$i > $(DISTDIR)/$$i; \
  796.         fi; \
  797.     done;)
  798.     mkdir $(DISTDIR)/generic
  799.     cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(DISTDIR)/generic
  800.     cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
  801.     cp -p $(TOP_DIR)/changes $(TOP_DIR)/README $(TOP_DIR)/license.terms \
  802.         $(DISTDIR)
  803.     rm -f $(DISTDIR)/generic/blt*.[ch]
  804.     mkdir $(DISTDIR)/win
  805.     cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h $(DISTDIR)/win
  806.     cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
  807.     cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
  808.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
  809.     mkdir $(DISTDIR)/win/rc
  810.     cp -p $(TOP_DIR)/win/rc/*.rc $(TOP_DIR)/win/rc/*.cur \
  811.         $(TOP_DIR)/win/rc/*.ico $(TOP_DIR)/win/rc/*.bmp \
  812.         $(DISTDIR)/win/rc
  813.     mkdir $(DISTDIR)/mac
  814.     sccs edit -s $(TOP_DIR)/mac/tkMacProjects.sit.hqx
  815.     cp -p tkMacProjects.sit.hqx $(DISTDIR)/mac
  816.     sccs unedit $(TOP_DIR)/mac/tkMacProjects.sit.hqx
  817.     rm -f tkMacProjects.sit.hqx
  818.     cp -p $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \
  819.         $(DISTDIR)/mac
  820.     cp -p $(TOP_DIR)/mac/README $(DISTDIR)/mac
  821.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/mac
  822.     cp -p $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac
  823.     cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac
  824.     cp -p $(TOP_DIR)/mac/*.exp $(DISTDIR)/mac
  825.     cp -p $(TOP_DIR)/mac/*.tcl $(DISTDIR)/mac
  826.     mkdir $(DISTDIR)/compat
  827.     cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
  828.         $(TCLDIR)/compat/stdlib.h $(TCLDIR)/compat/limits.h \
  829.         $(DISTDIR)/compat
  830.     mkdir $(DISTDIR)/xlib
  831.     cp -p $(TOP_DIR)/xlib/*.h $(TOP_DIR)/xlib/*.c $(DISTDIR)/xlib
  832.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib
  833.     mkdir $(DISTDIR)/xlib/X11
  834.     cp -p $(TOP_DIR)/xlib/X11/*.h $(DISTDIR)/xlib/X11
  835.     cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
  836.     mkdir $(DISTDIR)/library
  837.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
  838.         $(TOP_DIR)/library/tclIndex $(TOP_DIR)/library/prolog.ps \
  839.         $(DISTDIR)/library
  840.     mkdir $(DISTDIR)/library/images
  841.     @(cd $(TOP_DIR); for i in library/images/* ; do \
  842.         if [ -f $$i ] ; then \
  843.         cp $$i $(DISTDIR)/$$i; \
  844.         fi; \
  845.     done;)
  846.     mkdir $(DISTDIR)/library/demos
  847.     cp -pr $(TOP_DIR)/library/demos/*.tcl \
  848.         $(TOP_DIR)/library/demos/tclIndex \
  849.         $(TOP_DIR)/library/demos/browse \
  850.         $(TOP_DIR)/library/demos/hello $(TOP_DIR)/library/demos/ixset \
  851.         $(TOP_DIR)/library/demos/rmt $(TOP_DIR)/library/demos/rolodex \
  852.         $(TOP_DIR)/library/demos/square \
  853.         $(TOP_DIR)/library/demos/tcolor \
  854.         $(TOP_DIR)/library/demos/timer \
  855.         $(TOP_DIR)/library/demos/widget \
  856.         $(TOP_DIR)/library/demos/README \
  857.         $(TOP_DIR)/license.terms $(DISTDIR)/library/demos
  858.     mkdir $(DISTDIR)/library/demos/images
  859.     @(cd $(TOP_DIR); for i in library/demos/images/* ; do \
  860.         if [ -f $$i ] ; then \
  861.         cp $$i $(DISTDIR)/$$i; \
  862.         fi; \
  863.     done;)
  864.     mkdir $(DISTDIR)/doc
  865.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
  866.         $(TCLDIR)/doc/man.macros $(DISTDIR)/doc
  867.     cp /home/ouster/papers/tk4.0/tk4.0.ps $(DISTDIR)/doc
  868.     mkdir $(DISTDIR)/tests
  869.     cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/tests/*.test \
  870.         $(TOP_DIR)/tests/visual $(TOP_DIR)/tests/*.tcl \
  871.         $(TOP_DIR)/tests/README $(TOP_DIR)/tests/all \
  872.         $(TOP_DIR)/tests/defs $(TOP_DIR)/tests/option.file* \
  873.         $(DISTDIR)/tests
  874.  
  875. alldist: dist
  876.     rm -f /proj/tcl/dist/$(DISTNAME).tar.Z \
  877.         /proj/tcl/dist/$(DISTNAME).tar.gz \
  878.         /proj/tcl/dist/$(ZIPNAME)
  879.     cd /proj/tcl/dist; tar cf $(DISTNAME).tar $(DISTNAME); \
  880.         gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
  881.         compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) $(DISTNAME)
  882.  
  883. #
  884. # Target to create a Macintosh version of the distribution.  This will
  885. # do a normal distribution and then massage the output to prepare it
  886. # for moving to the Mac platform.  This requires a few scripts and
  887. # programs found only in the Tcl greoup's tool workspace.
  888. #
  889.  
  890. macdist: dist
  891.     rm -f $(DISTDIR)/mac/tkMacProjects.sit.hqx
  892.     tclsh $(TOOL_DIR)/man2html.tcl $(DISTDIR)/tmp ../.. tk$(VERSION)
  893.     mv $(DISTDIR)/tmp/tk$(VERSION) $(DISTDIR)/html
  894.     rm -rf $(DISTDIR)/doc
  895.     rm -rf $(DISTDIR)/tmp
  896.     tclsh $(TOOL_DIR)/cvtEOL.tcl $(DISTDIR)
  897.  
  898. #
  899. # Targets to build Solaris package of the distribution for the current
  900. # architecture.  To build stream packages for both sun4 and i86pc
  901. # architectures: 
  902. #
  903. #   On the sun4 machine, execute the following:
  904. #     make distclean; ./configure
  905. #     make DISTDIR=<distdir> package
  906. #
  907. #   Once the build is complete, execute the following on the i86pc
  908. #   machine:
  909. #     make DISTDIR=<distdir> package-quick
  910. #
  911. # <distdir> is the absolute path to a directory where the build should
  912. # take place.  These steps will generate the SUNWtk.sun4 and
  913. # SUNWtk.i86pc stream packages.  It is important that the packages be
  914. # built in this fashion in order to ensure that the architecture
  915. # independent files are exactly the same, including timestamps, in
  916. # both packages.
  917. #
  918.  
  919. package: dist package-config package-common package-binaries package-generate
  920. package-quick: package-config package-binaries package-generate
  921.  
  922. #
  923. # Configure for the current architecture in the dist directory.
  924. #
  925. package-config:
  926.     mkdir -p $(DISTDIR)/unix/`arch`
  927.     cd $(DISTDIR)/unix/`arch`; \
  928.         ../configure --prefix=/opt/SUNWtcl/$(TCLVERSION) \
  929.         --exec_prefix=/opt/SUNWtcl/$(TCLVERSION)/`arch` \
  930.         --with-tcl=$(DISTDIR)/../tcl$(TCLVERSION)/unix/`arch` \
  931.         --enable-shared
  932.     mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)
  933.     mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
  934.  
  935. #
  936. # Build and install the architecture independent files in the dist directory.
  937. #
  938.  
  939. package-common:
  940.     cd $(DISTDIR)/unix/`arch`;\
  941.     $(MAKE); \
  942.     $(MAKE) install-libraries install-man \
  943.         prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
  944.         exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
  945.     mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin
  946.     sed -e "s/TCLVERSION/$(TCLVERSION)/g" \
  947.         -e "s/TKVERSION/$(VERSION)/g" < $(UNIX_DIR)/wish.sh \
  948.         > $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
  949.     chmod 755 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
  950.  
  951. #
  952. # Build and install the architecture specific files in the dist directory.
  953. #
  954.  
  955. package-binaries: 
  956.     cd $(DISTDIR)/unix/`arch`; \
  957.     $(MAKE); \
  958.     $(MAKE) install-binaries prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
  959.         exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
  960.  
  961. #
  962. # Generate a package from the installed files in the dist directory for the
  963. # current architecture.
  964. #
  965.  
  966. package-generate:
  967.     pkgproto $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin=bin \
  968.          $(DISTDIR)/SUNWtcl/$(TCLVERSION)/include=include \
  969.          $(DISTDIR)/SUNWtcl/$(TCLVERSION)/lib=lib \
  970.          $(DISTDIR)/SUNWtcl/$(TCLVERSION)/man=man \
  971.          $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`=`arch` \
  972.     | tclsh $(TCLDIR)/unix/mkProto.tcl $(TCLVERSION) \
  973.         $(UNIX_DIR) > prototype
  974.     pkgmk -o -d . -f prototype -a `arch`
  975.     pkgtrans -s . SUNWtk.`arch` SUNWtk
  976.     rm -rf SUNWtk
  977.  
  978. # DO NOT DELETE THIS LINE -- make depend depends on it.
  979.